<html>
<head>
<title>淘宝弹出广告代码</title>
<script language="JavaScript">
//写入COOKIE
function setCookie(name,value){
var Days = 1;
var exp = new Date();
exp.setTime(exp.getTime() + Days*24*60*60*1000);
document.cookie = name + "="+ escape (value) + ";expires=" + exp.toGMTString();
}

//读取COOKIE
function getCookie(name){
var arr,reg=new RegExp("(^| )"+name+"=([^;]*)(;|$)");
if(arr=document.cookie.match(reg)) return unescape(arr[2]);
else return null;
}

window.attachEvent('onload', function(){alert('a');});
//if (getCookie("popWin")) return false;
//var o = document.getElementsByTagName("a");
//for (var i=0; i<o.length; i++){
//    o[i].attachEvent("onclick", function(){
//      if (!getCookie("popWin")){
//        setCookie("popWin", "true");
//        alert('a');
//        window.open("http://blog.fufuok.com/", "popWin", "toolbar=yes, menubar=yes, scrollbars=yes, resizable=yes, location=yes, status=yes");
//        window.focus();
//        }
//      });
//    }
//});
</script>
</head>
<body>
<a href="#">点击链接弹出窗口</a>
</body>
</html>